package com.mazaiting.common.core.domain.result;

import java.util.List;

/**
 * 下拉选项对象
 */
public class Option<T> {

    public Option() {}

    public Option(T value, String label) {
        this.value = value;
        this.label = label;
    }

    public Option(T value, String label, List<Option<T>> children) {
        this.value = value;
        this.label = label;
        this.children= children;
    }

    /**
     * 选项的值
     */
    private T value;

    /**
     * 选项的标签
     */
    private String label;

    /**
     * 子元素
     */
    private List<Option<T>> children;

    public T getValue() {
        return value;
    }

    public void setValue(T value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<Option<T>> getChildren() {
        return children;
    }

    public void setChildren(List<Option<T>> children) {
        this.children = children;
    }
}